﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    
    Crear
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">    
    <link href="../../Content/jquery-ui-1.8.13.custom.css" rel="stylesheet" type="text/css" />   
    <script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.13.custom.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>

    <script>
        $(function () {

            
            $("#fecha").datetimepicker({});
            
            
            $("#curso").change(function () {
             var c = $("#curso").val();
                $.getJSON("<%=Url.Action("getasignaturas") %>"+"/"+"?ID="+c, null,function(Data){
                        $("#asignatura").html(Data);
                        $("#materia").html("");

	                });
            });
                               

            $("#asignatura").change(function () {

                var a = $("#asignatura").val();

                $.getJSON("<%=Url.Action("getmaterias") %>"+"/"+"?ID="+a, null,
                    
                    function(Data){
                        $("#materia").html(Data);

	                });
        });

        });
	</script>


    <h2>Crear</h2>
    
    <form action="/Tutorias/Crear" method="post">
    
    
    Seleccione un Tema:

    <table>
    <tr>
        <td><select style="width: 100%" id="curso" size="5" name="curso">
        <%=TempData["listacursos"] as string %>        
        </select></td>
        <td><select width="200" style="width: 200px" id="asignatura" size="5" name = "asignaturaID"> </select></td>
        <td><select width="200" style="width: 200px" id="materia" size="5" name = "materiaID"> </select></td>
     
    </tr>
    
    </table>

    <br />
    Máxima Cantidad de Alumnos: 
    <br />    
    <%: Html.DropDownList("usuariosMax", TempData["maxUsuarios"] as SelectList)%>  
    
 
   

    <br />
    <br />
    
   
    
    Fecha: <br />

    <input id="fecha" type="text" name = "fecha" />
    
    <br />
    <br />
    <br />
    
     Descripción: <br />
    
    <%=Html.TextArea("descripcion") %> 
    
    
    
    
    <br />

    <br />
    <br />
    
    <input type="submit" value="Crear" />
    </form>


</asp:Content>
